# 作者：石吴震
# 2024年12月30日11时00分49秒
# 474160957@qq.com



class Animal:

    def eat(self):
        print(f"吃----")

    def drink(self):
        print(f"喝----")

    def run(self):
        print(f"跑----")

    def sleep(self):
        print(f"睡----")

class Dog(Animal):
    def __init__(self, name, color):
        self.name = name
        self.color = color

    def bark(self):
        print(f"汪汪叫----")

class Cat(Animal):

    def meow(self):
        print(f"喵喵叫----")

class XiaoTianQuan():
    def __init__(self, name, color, age):
        super().__init__(name,color) # 调用父类的构造函数
        self.age = age
    def fly(self):
        print(f"翱翔----")

if __name__ == '__main__':
    wangcai = Dog('旺财','黄色')
    wangcai.eat()
    wangcai.drink()
    wangcai.run()
    xiaotianquan=XiaoTianQuan('哮天犬','黑色',10)
    xiaotianquan.fly()
